package com.google.code.shardbatis.util;

public class MapperUtils {

	/**
	 * 解析MapperId
	 * @param mapperId
	 * @return 字符串数组
	 * 	0 -- Mapper类
	 * 	1 -- Mapper方法
	 */
	public static String[] parseMapperId(String mapperId) {
		int i = mapperId.lastIndexOf(".");
		return new String[] {
			mapperId.substring(0, i), 
			mapperId.substring(i + 1)
		};
	}
	
	/**
	 * 
	 * @param name
	 * @return
	 */
	public static String convertName(String name) {
		String convertname = name.replace("`", "");
		convertname = convertname.replace("\"", "");
		return convertname;
	}
	
}
